package com.changan.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.changan.entity.User;
import com.changan.mapper.UserMapper;
import com.changan.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.changan.vo.UserVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author xsy
 * @since 2021-08-26
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public Page<User> findUserInnerDepart(Page<User> page, UserVo userVo) {
        List<User> userList = this.baseMapper.findUserInnerDepart(page, userVo);
        //发送集合到分页mybatispuls
        page.setRecords(userList);

        return page;
    }
}
